package com.ag.lzw.common;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.ag.bean.TbOverRequest;

/**
 * 任务办结状态的实体类
 * @author zhiweiofli
 *
 */
@Entity
@Table(name = "TB_OVER_STATUS", schema = "dbo", catalog = "AGDB")
public class TbOverStatus {

	private String sid;
	private String sname;
	private Set<TbOverRequest> tbOverRequests = new HashSet<TbOverRequest>(0);
	
	public TbOverStatus(){
		
	}
	public TbOverStatus(String id,String name){
		this.sid = id;
		this.sname = name;
	}
	@Id
	@Column(name = "tos_id", unique = true, nullable = false, length = 4)
	public String getSid() {
		return sid;
	}
	public void setSid(String sid) {
		this.sid = sid;
	}
	@Column(name = "tos_name", nullable = true, length = 50)
	public String getSname() {
		return sname;
	}
	public void setSname(String sname) {
		this.sname = sname;
	}
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbOverStatus")
	public Set<TbOverRequest> getTbOverRequests() {
		return tbOverRequests;
	}
	public void setTbOverRequests(Set<TbOverRequest> tbOverRequests) {
		this.tbOverRequests = tbOverRequests;
	}
	
}
